/**
 * @param {JSEvent} event
 * @param {String} frm
 *
 * @properties={typeid:24,uuid:"758C0FE5-0B28-4FC0-A39F-7B8A4B44CB16"}
 */
function btn_ver_ficha_frm(event, frm) {
	
	if (!forms[frm])
		return;
	
	var ds = databaseManager.convertToDataSet(foundset.getSelectedRecord().getPKs());
	forms[frm].foundset.loadRecords(ds);
	if (forms[frm].hide_btn_reset_fields)
		forms[frm].hide_btn_reset_fields(event);
	forms[frm].controller.show();
}

/**
 * @param {JSEvent} event
 * @param {String} frm
 *
 * @properties={typeid:24,uuid:"E30B9AE1-6DBF-45D0-B6D8-D34975266A0E"}
 */
function btn_ver_ficha_dlg(event, frm) {

	if (!forms[frm])
		return;
	
	var win = application.createWindow(application.getUUID().toString(),JSWindow.MODAL_DIALOG);
	win.resizable = false;
	win.storeBounds = false;
	win.undecorated = true;
	
	var ds = databaseManager.convertToDataSet(foundset.getSelectedRecord().getPKs());
	forms[frm].foundset.loadRecords(ds);
	if (forms[frm].hide_btn_reset_fields)
		forms[frm].hide_btn_reset_fields(event);
	win.show(forms[frm]);
}


/**
 * @param {JSEvent} event
 * @param {JSRecord} jsrecord
 *
 * @properties={typeid:24,uuid:"482142FF-CB83-4A73-978E-8EB21DBE0160"}
 */
function btn_eliminar_ficha(event, jsrecord) {
	
	globals.deleteRecord(foundset,jsrecord)
}
